<?php

class WorkflowVariables extends BaseModel
{

    /**
     * Returns the static model of the specified AR class.
     * @return CActiveRecord the static model class
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

    /**
     * @return string the associated database table name
     */
    public function tableName()
    {
        return 'workflow_variables';
    }

    public function relations() {
        return array(
            'workflow'  =>  array(self::BELONGS_TO, 'Workflow', 'workflow_id', 'joinType' => 'INNER JOIN'),
            'job'  =>  array(self::BELONGS_TO, 'Job', 'job_id', 'joinType' => 'INNER JOIN'),
        );
    }

    public function attributeLabels()
    {
        return array(
            'variable_name' => '变量名',
            'value' => '变量值',
        );
    }

}
